package arrayCopy;

import java.util.Arrays;

public class ArrayCopy3 {
	public static void main(String[] args) {
		int a[]={4,5,7,33,74,12,23};
		int b[]={5,7,2,55,23,17,38,78};
		int c[]=new int[a.length+b.length];
		int d[]=Arrays.copyOfRange(a, 2, 6);
		System.arraycopy(a, 0, c, 0, a.length);
		System.arraycopy(b, 0, c,a.length , b.length);
			for (int i : d) {
				System.out.print(i+" ");
			}
			System.out.println();
			for (int i : c) {
				System.out.print(i+" ");
			}
		
		
	}

}
